home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / BFSORTS.ARJ / README.SRT < prev    next >
Text File  |  1990-12-26  |  3KB  |  46 lines

  1.   These files are a series of sort algorithms, coded in ANSI standard C, and
  2. a program to execute them with.  Each of the sort functions conforms to the
  3. ANSI definition of qsort(), with one minor exception -- whereas qsort() is of
  4. type void, these functions return an integer: S_OK to indicate success, or
  5. S_NOMEM to indicate that there was insufficient memory to perform the sort.
  6.  
  7.   The shell program has a number of options, but is inflexible in one way: it
  8. deals with arrays of type 'double'.  It allows you to choose the number of
  9. doubles to be sorted at runtime, and allows you to choose how sorted they are
  10. before execution, on a scale of -1 (reverse sorted) to 0 (random order) to +1
  11. (sorted).  This is useful in examining the dependence of a sort on any ordering
  12. of its input data.
  13.  
  14.   The shell also allows you to either display, or suppress the display, of the
  15. array.  As a debugging aid, it also verifies that the array, after being
  16. sorted, is actually in order.
  17.  
  18.   Finally, the shell measures the amount of time taken in performing the sort.
  19. Time taken to generate the input and verify the sort are not taken into
  20. account by this.  The time is displayed in seconds.
  21.  
  22.   Please send any comments or questions to me either on CompuServe (ID
  23. 71320,3635) through EasyPlex, BPROGB, or MACDEV.  I also hang around on a
  24. number of other forums, but I usually check the above daily.
  25.  
  26.   Alternatively, comments may be left on my bulletin board.  It's the
  27. Enlightened, at (703) 370-9528, N/8/1, 2400 bps or less.
  28.  
  29.   My intent in uploading these routines is to establish a standard set of
  30. sorting routines that programmers can use.  Feel free to use these routines in your own programs.  Also, feel free to add your own routines to the set; if you
  31. do so, please include your own name and where you can be reached in the .C
  32. and .H files.  I'd rather that you didn't distribute any modifications of my
  33. source (you are welcome to distribute the originals, of course), except for
  34. SORT.H and TESTSORT.C (to accommodate any new routines you include).  If
  35. you modify the above, please document what you did in the modified files.
  36.  
  37.   Also, one more request.  I've tried to keep this library to the ANSI
  38. standard.  Please do the same.  This code was developed using Borland's Turbo
  39. C 2.0, and verified to work with Turbo C++ as well.  It should also work on
  40. other ANSI-compatible systems, including THINK C on the Macintosh (which I'd
  41. really like to get one of these days).  Let's keep it that way -- no compiler-
  42. dependent tricks.
  43.  
  44. Bruce Feist
  45. 12/26/90
  46.